/**
 * FileName: CpuLoad
 * Author:   powersi
 * Date:     2021/3/2 21:27
 * Description:
 */
package com.zm.demo.core.jvm;

import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Description: 
 * Author:      powersi
 * Date:        2021/3/2 21:27
 */
public class CpuLoad {

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()*100);
        Random random = new Random();
        while (true){
            executorService.submit(() -> {
                int i = random.nextInt(10) * random.nextInt(10);
                System.out.println(i-1);
            });
        }


    }
}
